import java.util.Scanner;

public class text1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        char[] arr = str.toCharArray();
        int left=0,right=0,count=0;

        for (int i=0;i<arr.length;i++){
            if (arr[i]=='"'){
                left=++i;
                while(arr[i]!='"'){ i++; }
                /*right=i-1;

                for (int j=left;j<=right;j++){
                    System.out.print(arr[j]);
                }
                System.out.println();
                left = right+2;
                i=i+1;*/
            } else if (arr[i]==' '){
                count++;
            }
        }

        System.out.println(count+1);
        for (int i=0;i< arr.length;i++){
            if (arr[i]=='"'){
                while(arr[i]!='"'){
                    System.out.println(arr[i]);
                }
                i++;
            } else if (arr[i]!=' '){
                System.out.print(arr[i]);
            } else if (arr[i]==' '){
                System.out.println();
            }
        }
    }
}
